[XEN] Quieten down HVM debug output.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Fri, 1 Dec 2006 11:54:53 +0000 (11:54 +0000)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Fri, 1 Dec 2006 11:54:53 +0000 (11:54 +0000)
Signed-off-by: Keir Fraser <keir@xensource.com>
xen/arch/x86/hvm/vlapic.c
xen/arch/x86/x86_emulate.c

index 60e6171c477eb3a438263827fe048cf2ab7e8557..a0304deb375eddebfa70d21d45974be175ec1ce1 100644 (file)
@@ -723,7 +723,7 @@ static void vlapic_write(struct vcpu *v, unsigned long address,
         break;
 
     default:
-        gdprintk(XENLOG_WARNING, 
+        gdprintk(XENLOG_DEBUG,
                  "Local APIC Write to read-only register 0x%x\n", offset);
         break;
     }
index 555655f83a07100ee8f3c9a979029d76a9b70a37..e5f6a6b503931771fd5360d5b49f7ce0b058e9ed 100644 (file)
@@ -7,16 +7,14 @@
  */
 
 #ifndef __XEN__
-#include <stdio.h>
+#include <stddef.h>
 #include <stdint.h>
 #include <public/xen.h>
-#define dprintf(_f, _a...) printf( _f , ## _a )
 #else
 #include <xen/config.h>
 #include <xen/types.h>
 #include <xen/lib.h>
 #include <asm/regs.h>
-#define dprintf(_f, _a...) gdprintk(XENLOG_WARNING, _f , ## _a )
 #undef cmpxchg
 #endif
 #include <asm-x86/x86_emulate.h>
@@ -440,27 +438,6 @@ decode_register(
     return p;
 }
 
-static void
-dump_instr(
-    struct x86_emulate_ctxt *ctxt,
-    struct x86_emulate_ops  *ops)
-{
-#ifdef __XEN__
-    int i;
-    unsigned long x, eip = ctxt->regs->eip;
-
-    dprintf("Instr:");
-    for ( i = 0; i < 16; i++, eip++ )
-    {
-        if ( ops->read(x86_seg_cs, eip, &x, 1, ctxt) != 0 )
-            printk(" ??");
-        else
-            printk(" %02x", (uint8_t)x);
-    }
-    printk("\n");
-#endif
-}
-
 int
 x86_emulate_memop(
     struct x86_emulate_ctxt *ctxt,
@@ -579,10 +556,7 @@ x86_emulate_memop(
         modrm_rm  = modrm & 0x07;
 
         if ( modrm_mod == 3 )
-        {
-            dprintf("Cannot parse ModRM.mod == 3.\n");
             goto cannot_emulate;
-        }
 
         if ( ad_bytes == 2 )
         {
@@ -1206,7 +1180,15 @@ x86_emulate_memop(
     goto writeback;
 
  cannot_emulate:
-    dprintf("Cannot emulate %02x\n", b);
-    dump_instr(ctxt, ops);
+#ifdef __XEN__
+    gdprintk(XENLOG_DEBUG, "Instr:");
+    for ( ea_off = ctxt->regs->eip; ea_off < _regs.eip; ea_off++ )
+    {
+        unsigned long x;
+        ops->read(x86_seg_cs, ea_off, &x, 1, ctxt);
+        printk(" %02x", (uint8_t)x);
+    }
+    printk("\n");
+#endif
     return -1;
 }